x86/vpmu: Remove core2_no_vpmu_ops
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 4 Oct 2016 19:35:45 +0000 (20:35 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 9 Dec 2016 18:32:17 +0000 (18:32 +0000)
commitcf0bd1cc3102e278de77399e8c9e49c15cc01d9c
tree29224d6b8d0366a7257e3f94dd87ab9d3c784573
parent636b15c17a2844a5764733f9f249a5ef9a9631ad
x86/vpmu: Remove core2_no_vpmu_ops

core2_no_vpmu_ops exists solely to work around the default-leaking of CPUID/MSR
values in Xen.

With CPUID handling removed from arch_vpmu_ops, the RDMSR handling is the last
remaining hook.  Since core2_no_vpmu_ops's introduction in c/s 25250ed7 "vpmu
intel: Add cpuid handling when vpmu disabled", a lot of work has been done and
the nop path in vpmu_do_msr() now suffices.

vpmu_do_msr() also falls into the nop path for un-configured or unprivileged
domains, which enables the removal the duplicate logic in priv_op_read_msr().

Finally, make all arch_vpmu_ops structures const as they are never modified,
and make them static as they are not referred to externally.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/cpu/vpmu.c
xen/arch/x86/cpu/vpmu_amd.c
xen/arch/x86/cpu/vpmu_intel.c
xen/arch/x86/traps.c
xen/include/asm-x86/vpmu.h